const express = require("express");
// 引入bodyParser中间件
const bodyParser = require("body-parser");
// 引入stype路由
const stypeRouter = require("./router/stype.js");
// 引入sval路由
const svalRouter = require("./router/sval.js");
// 引入fuound路由
const foundRouter = require("./router/found.js");
// 引入erepair路由
const erepairRouter = require("./router/erepair.js");
// 引入home路由
const homeRouter = require("./router/home.js");
// 引入guide路由
const guideRouter = require("./router/guide.js");
// 引入bo_user路由
const bo_userRouter = require("./router/bo_user.js");
const house_structureRouter = require("./router/house_structure.js");
const regional_classificationRouter = require("./router/regional_classification.js");
const suoRouter=require('./router/store_suo.js');
const detailRouter=require('./router/store_detail.js');
// 创建web服务器
const app = express();
// 设置端口
app.listen(8080,()=>{
  console.log("server is runing...")
});
// 使用bodyParser中间件将流传递的数据转换成对象
app.use(bodyParser.urlencoded({
  extended:false
}));
// 挂载stype
app.use("/stype/v1",stypeRouter);
// 挂载sval
app.use("/sval/v1",svalRouter);
// 挂载found
app.use("/found/v1",foundRouter);
// 挂载
app.use("/erepair/v1",erepairRouter);
app.use("/home/v1",homeRouter);
app.use("/guide/v1",guideRouter);
app.use("/bo_user/v1",bo_userRouter);
app.use("/house_structure/v1",house_structureRouter);
app.use("/regional_classification/v1",regional_classificationRouter);
app.use("/store_suo/v1",suoRouter);
app.use("/store_detail/v1",detailRouter);